 {% include 'header.twig' %}

<script src="{{subfolder}}/js/xloadtree/xtree2.js" type="text/javascript"></script>
<script src="{{subfolder}}/js/xloadtree/xloadtree2.js" type="text/javascript"></script>
<style type="text/css">
.webfx-tree-children {
    background-image: url("{{icons.I}}");
}
</style>
</head>

<body class="browser">

    <div dir="{{lang.applangdir}}">

        <div class="logo">
            <a href="{{subfolder}}/" target="_parent">{{appName}}</a>
        </div>
        <div class="refreshTree">
            <a href="{{subfolder}}/src/views/browser" target="browser">
                    <img src="{{icon.Refresh}}" alt="{{lang.strrefresh}}" title="{{lang.strrefresh}}" />
                </a>
        </div>

    </div>
    <script type="text/javascript">
    webFXTreeConfig.folderIcon = "";
    webFXTreeConfig.openFolderIcon = "";
    webFXTreeConfig.fileIcon = "";
    webFXTreeConfig.rootIcon = "{{icon.Servers}}";
    webFXTreeConfig.openRootIcon = "{{icon.Servers}}";
    webFXTreeConfig.iIcon = "{{icon.I}}";
    webFXTreeConfig.lIcon = "{{icon.L}}";
    webFXTreeConfig.lMinusIcon = "{{icon.Lminus}}";
    webFXTreeConfig.lPlusIcon = "{{icon.Lplus}}";
    webFXTreeConfig.tIcon = "{{icon.T}}";
    webFXTreeConfig.tMinusIcon = "{{icon.Tminus}}";
    webFXTreeConfig.tPlusIcon = "{{icon.Tplus}}";
    webFXTreeConfig.blankIcon = "{{icon.blank}}";
    webFXTreeConfig.loadingIcon = "{{icon.Loading}}";
    webFXTreeConfig.errorIcon = "{{icon.ObjectNotFound}}";
    webFXTreeConfig.loadingText = "{{lang.strloading}}";
    webFXTreeConfig.errorLoadingText = "{{lang.strerrorloading}}";
    webFXTreeConfig.reloadText = "{{lang.strclicktoreload}}";
    // Set default target frame:
    //WebFXTreeAbstractNode.prototype.target = '_parent';
    WebFXTreeAbstractNode.prototype.target = 'detail';
    // Disable double click:
    WebFXTreeAbstractNode.prototype._ondblclick = function () {}
    // Show tree XML on double click - for debugging purposes only
    /*
    // UNCOMMENT THIS FOR DEBUGGING (SHOWS THE SOURCE XML)
    WebFXTreeAbstractNode.prototype._ondblclick = function(e){
        var el = e.target || e.srcElement;

        if (this.src != null)
            window.open(this.src, this.target || "_self");
        return false;
    };
    */
    //var tree = new WebFXLoadTree("{{strservers}}", "/tree/servers" /* src for sub branches */ , "/src/views/servers.php" /* action */ );
    var tree = new WebFXLoadTree("{{lang.strservers}}", "{{subfolder}}/src/views/servers?action=tree", "servers");
    tree.write();
    tree.setExpanded(true);
    </script>

</body>

</html>